package cn.changeforyou.web.cloud.auth.entity.vos;

import cn.changeforyou.web.cloud.auth.entity.User;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.OneToMany;
import java.util.List;

@Data
public class UserVO extends User {

    /***
     * select xxx, role_id from xx left
     */
    @OneToMany
    @TableField(value = "role_id")
    @JoinTable(name = "user_role_info", joinColumns = {@JoinColumn(name = "id", referencedColumnName = "user_id")})
    private List<String> roleIds;
}
